<template>
	<div class="checkstore" id="checkstore">
		<div class="st_t1">
			商家详情
		</div>
		<div class="admin_info">
			<ul>
				<li>
					<div class="admin_left">商家名称：</div>
					<div class="admin_right">{{brandInfo.brandName}}</div>
				</li>
				<li>
					<div class="admin_left">副标题：</div>
					<div class="admin_right">{{brandInfo.title}}</div>
				</li>
				<li class="imgList">
					<div class="admin_left">商家图片：</div>
					<div class="admin_right">
						<img :src="brandInfo.brandImg" />
					</div>
				</li>
				<li>
					<div class="admin_left">商家地址：</div>
					<div class="admin_right">{{brandInfo.address}}</div>
				</li>
				<li class="imgList">
					<div class="admin_left">二维码：</div>
					<div class="admin_right">
						<img :src="brandInfo.twoCode" />
						<!--<button class="saveCode">保存该二维码</button>-->
					</div>
				</li>
			</ul>
		</div>
		<totaltable></totaltable>
		
		<div class="note">
			<div class="note_title">
				<div class="st_t1">详细记录</div>
			</div>
		</div>
		
		<detailtable></detailtable>
	</div>
</template>

<script>
	 
	import totaltable from './pannel/total_table';
	import detailtable from './pannel/detail_table'
	export default {
		name: 'checkstore',
		computed: {
		},
		data() {
			return {
				title: '',
				trade_index: 1,
				brandInfo:{
					brandName:'',
					title:'',
					brandImg:'',
					address:'',
					twoCode:''
				},
				tbCount:{
					liuLnum:'',
					playnum:'',
					praisenum:'',
					readnum:'',
					savenum:'',
				}
			}
		}, //定义变量
		components: {
			totaltable,
			detailtable
		}, //注册组件
		methods: {//方法都在这里
			
		},
		mounted() {
			var that = this;
			//获取banner
		},
		beforeCreate:function(){
			var that=this
			var storeId={
				key:that.GetRequest().id
			}
			var that = this;
			this.lh_http('post', "tbBrand/get",storeId).done(function(res) {
				if(res.status) {
//					console.log(res)
					var brand=res.data.tbBrand
					that.brandInfo.brandName=brand.brandName
					that.brandInfo.title=brand.title
					that.brandInfo.brandImg=brand.brandImg
					that.brandInfo.address=brand.address
					that.brandInfo.twoCode=brand.twoCode
					var tbCount=res.data.tbCount
					that.tbCount.liuLnum=tbCount.liuLnum
					that.tbCount.playnum=tbCount.playnum
					that.tbCount.praisenum=tbCount.praisenum
					that.tbCount.readnum=tbCount.readnum
					that.tbCount.savenum=tbCount.savenum
				} else {
					alert(res.data);
				}
			})
		}
	}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss">
	.checkstore {
	text-align: left;
	padding-left:20px;
		.st_t1 {
			line-height: 40px;
			font-size:24px;
			font-weight: normal;
			background:#ECECEC;
			padding-left:20px;
		}
		.admin_info{
			width:100%;
			margin:20px auto 0;
			ul{
				li{
					width:100%;
					overflow: hidden;
					zoom:1;
					.admin_left{
						float:left;
						width:100px;
						line-height: 40px;
					}
					.admin_right{
						float:left;
						line-height: 40px;
					}
				}
				.imgList{
					.admin_right{
						position: relative;
						img{
							margin-top:5px;
							width:200px;
							height:200px;
						}
						.saveCode{
							width:134px;
							height:40px;
							background:#007AFF;
							color:#fff;
							border-radius:4px;
							cursor: pointer;
							position: absolute;
							top:5px;
							right:-160px;
						}
					}
				}
			} 
		}
		.note{
			margin-top:20px;
			.note_title{
				position:relative;
				.note_time{
					position: absolute;
					top:0px;
					left:300px;
					input{
						width:110px;
						height:30px;
						border:#ccc solid 1px;
						padding-left:10px;
						margin-top:5px;
					}
				}
			}
		}
	}
</style>